﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using PloobsEngine.Physics.XJigLib;

namespace PloobsEngine.Behaviors
{
    public class SmoothMovimentationAction : IAction
    {
        private CharacterObject co;        
        private float aceleration;
        private float rot=1;         
        private Vector3 direction;        

        public SmoothMovimentationAction(JigLibXObject obj)
        {
            co = obj as CharacterObject;
        }        
        public void setRotationStep(float rot)
        {
            this.rot= rot;
        }

        public void setAceleration(float velo)
        {
            this.aceleration = velo;
        }

        public string Action()
        {         
            co.CharacterBody.DesiredVelocity = co.FaceVector * aceleration;                              
            co.RotationAngle += rot;                                                
            return null;
        }

    }
}
